package cn.edu.whu.irlab.service.impl;

import cn.edu.whu.irlab.dao.AnswerMapper;
import cn.edu.whu.irlab.model.Answer;
import cn.edu.whu.irlab.service.AnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Roger on 2016/7/30.
 */
@Service
public class AnswerServiceImpl implements AnswerService{

    @Autowired
    private AnswerMapper answerMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return answerMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Answer record) {
        return answerMapper.insert(record);
    }

    @Override
    public int insertSelective(Answer record) {
        return answerMapper.insertSelective(record);
    }

    @Override
    public Answer selectByPrimaryKey(Integer id) {
        return answerMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Answer record) {
        return answerMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Answer record) {
        return answerMapper.updateByPrimaryKey(record);
    }

    @Override
    public int increaseApprovalNum(Integer id) {
        return answerMapper.increaseApprovalNum(id);
    }
}
